﻿using System;
using System.Collections.Generic;
using System.Text;

using MySql.Data.MySqlClient;

namespace Obsolete.VoIP.Getafisk.DLL_01BL_02netfx20.any_any_any
{
	public
		partial
		class
		DataBase
	{
		MySqlConnection mysql_connection;

		string ConnectionString =
			@"server=192.168.11.251;Persist Security Info=True;"
			+
			@"User Id=root;Pwd=hwtest;database=asterisk"
			;

		public
			string
			DebugError
			;

		public
			DataBase
			(
			)
		{
			mysql_connection = new MySqlConnection(ConnectionString);

			try
			{
				mysql_connection.Open();
			}
			catch(MySqlException e)
			{			
				//......................................................................
				//string msg = string.Empty;
				StringBuilder sb = new StringBuilder();
				sb.Append("MySQL error: ");
				sb.Append(Environment.NewLine);
				sb.Append(e.Message);
				sb.Append(Environment.NewLine);
				sb.Append(e.Message);
				sb.Append(ConnectionString);
				//sb.Append("");
				//sb.ToString();
				//return msg;
				//......................................................................
	
				DebugError += sb.ToString();
			}

			return;
		}
	}
}
